package Beans;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "netcard")
public class Ter3gExpenses {

	private int cardId;
	private float leftBalance;// 余额
	private float usedFlow;// 已用流量
	private float leftFlow;// 剩余流量
	private Timestamp updateTime;// 更新时间
	private Terminal terminal;

	@GenericGenerator(name = "generator", strategy = "native")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "netcard_id", unique = true, nullable = false)
	public int getCardId() {
		return cardId;
	}

	public void setCardId(int cardId) {
		this.cardId = cardId;
	}

	@Column(name = "netcard_leftbalance")
	public float getLeftBalance() {
		return leftBalance;
	}

	public void setLeftBalance(float leftBalance) {
		this.leftBalance = leftBalance;
	}

	@Column(name = "netcard_usedflow")
	public float getUsedFlow() {
		return usedFlow;
	}

	public void setUsedFlow(float usedFlow) {
		this.usedFlow = usedFlow;
	}

	@Column(name = "netcard_leftflow")
	public float getLeftFlow() {
		return leftFlow;
	}

	public void setLeftFlow(float leftFlow) {
		this.leftFlow = leftFlow;
	}

	@Column(name = "netcard_updatetime")
	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	@ManyToOne
	@JoinColumn(name = "netcard_terminal_id")
	public Terminal getTerminal() {
		return terminal;
	}

	public void setTerminal(Terminal terminal) {
		this.terminal = terminal;
	}

}
